home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Texteditors / FrexxEd / fpl / GCCmode.FPL < prev    next >
Encoding:
Text File  |  1996-09-27  |  1.7 KB  |  57 lines

  1. // $Id: GCCmode.FPL 1.3 1995/10/04 13:56:15 jskov Exp jskov $
  2. // $VER: GCCMode.FPL 1.1 (05.10.95) © Jesper Skov
  3.  
  4. string makeOptions="";
  5.  
  6. //»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»» changeMakeOptions() ««
  7. export void changeMakeOptions()
  8. {
  9.   makeOptions = PromptString(makeOptions, "Enter new make options");
  10. }
  11.  
  12. //»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»» gccCompile() ««
  13. export void gccCompile()
  14. {
  15.   int parent;
  16.   int entryID = GetEntryID("_gcc compile_");
  17.   string path = ReadInfo("file_path");
  18.   string me;
  19.  
  20.   if(!ReadInfo("filehandler")){
  21.     SetInfo(-2,"filehandler",1);
  22.     Delay(100);                                // wait 2 secs
  23.   }
  24.     
  25.   me = "\""+ReadInfo("disk_name")+":_gcc compile_\"";
  26.  
  27.   if (!strlen(path))
  28.     path = ReadInfo("directory");
  29.  
  30.   if(!entryID){
  31.     entryID = New();
  32.     parent = CurrentBuffer(entryID);
  33.     Rename("_gcc compile_");
  34.     CurrentBuffer(parent);
  35.   }
  36.  
  37.   Visible(0);
  38.   Activate(entryID,1);
  39.   ResizeView(ReadInfo("view_lines",entryID)/2,entryID);
  40.   Visible(1);
  41.  
  42.   SaveString("T:gccCompile","echo >"+me+" Compilation started at `date`\ncd "+path+"\nmake >>"+me+" "+makeOptions+"\necho >>"+me+" Compilation ended at `date`");
  43.   System("run execute t:gccCompile");
  44. }
  45.  
  46. //»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»» key bindings ««
  47. AssignKey("gccCompile();","control c control c", "gcc_mode");
  48. AssignKey("changeMakeOptions();","control C control C", "gcc_mode");
  49.  
  50. //»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»» GCCMode settings ««
  51. ConstructInfo("gcc_mode", "","", "LBH","", 0,0,0);
  52. ConstructInfo("gcc_mode_ext", "","", "GSHW","", 0,0,"*c*h*");
  53. ConstructInfo("gcc_mode_exe", "","", "GSHW","", 0,0,"CModeInit();");
  54.  
  55. AddMode(1, "gcc_mode", "gcc_mode_ext", "gcc_mode_exe");
  56.  
  57.